#define _CRT_SECURE_NO_WARNINGS 1

#include "Binarytree.h"

void BTtest1(void)
{
	BTNode* root = CreatTree();
	//PreOrder(root);
	//InOrder(root);
	//PostOrder(root);
	//printf("TreeSize = %d\n", TreeSize(root));
	//printf("%d %d\n", TreeKLevel(root, 2), TreeKLevel(root, 3));
	//printf("TreeDepth = %d\n", TreeDepth(root));
	LevelOrder(root);
	BinaryTreeDestroy(&root);
}

void BTtest2(void)
{
	BTNode* root = CreatTree();
	//BTNode* res = BinaryTreeFind(root, 3);
	//if (res) {
	//	printf("%d\n", res->data);
	//}

	//res = BinaryTreeFind(root, 10);
	//if (res) {
	//	printf("%d\n", res->data);
	//}

	int res = BinaryTreeLeafSize(root);
	printf("%d\n", res);

	BinaryTreeDestroy(&root);
}

int main()
{
	//BTtest1();
	BTtest2();
	return 0;
}